#ifndef TABLEMODEL_H
#define TABLEMODEL_H

#include <QSortFilterProxyModel>

class TableModel : public QAbstractTableModel
{
    int rCnt;
    int cCnt;
    QHash< QModelIndex, QVariant > modelData;

public:
    TableModel( int nRows = 0, int nColumns = 0, QObject * pobj = 0 );

    QVariant data( const QModelIndex & index, int nRole ) const ;
    bool setData( const QModelIndex & index, const QVariant & value, int nRole );
    int rowCount( const QModelIndex & index = QModelIndex() ) const;
    int columnCount( const QModelIndex & index ) const;
    Qt::ItemFlags flags( const QModelIndex & index ) const;

    int Rows() { return rCnt; }
    int Columns() { return cCnt; }

    void ClearData();

private:
};

#endif // TABLEMODEL_H
